<?php

namespace app\api\model\v1;

use think\Model;
use traits\model\SoftDelete;

class Dianpu extends Model
{

    use SoftDelete;

    

    // 表名
    protected $name = 'shop_dianpu';
    
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';

    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = '';
    protected $deleteTime = 'deletetime';


    public function getimagesAttr($value, $data)
    {
        $image = cdnurl($value,true);
        return $image;
    }
    public function getyyzzAttr($value, $data)
    {
        $image = cdnurl($value,true);
        return $image;
    }
    public function getidcardimageAttr($value, $data)
    {
        $image = cdnurl($value,true);
        return $image;
    }
    public function getidcardsimageAttr($value, $data)
    {
        $image = cdnurl($value,true);
        return $image;
    }
    

    public function getcreatetimeAttr($value, $data)
    {
      $createtime = date('Y-m-d H:i:s',$value);
        return $createtime;
    }

    public function getshenhetimeAttr($value, $data)
    {
      $createtime = date('Y-m-d H:i:s',$value);
        return $createtime;
    }

}

